package com.glsc.ngateway.common.api.flowable.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
import com.glsc.ngateway.common.api.flowable.dto.task.FlowFormBaseEntityDto;
import lombok.*;
import lombok.experimental.SuperBuilder;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * @author zhengyr
 * @date 2023/8/2-14:44
 * 新增的part规格明细数据
 */
@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
public class FlowFormDeviceInDetailDto extends FlowFormBaseEntityDto {

    @Builder.Default
    private Integer detailIndex = 1;

    private String deviceStandardCode;

    private String name;

    private String sn;

    private Integer machineRoomId;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @JsonSerialize(using = LocalDateSerializer.class)
    @JsonDeserialize(using = LocalDateDeserializer.class)
    private LocalDate manufactDate;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @JsonSerialize(using = LocalDateSerializer.class)
    @JsonDeserialize(using = LocalDateDeserializer.class)
    private LocalDate expirateDate;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @JsonSerialize(using = LocalDateSerializer.class)
    @JsonDeserialize(using = LocalDateDeserializer.class)
    private LocalDate purchaseDate;

    private Integer deviceTypeId;

    private BigDecimal inputPriceWithTax;

    private BigDecimal inputPriceNoTax;

    private String user;

    @Builder.Default
    private Integer lifeStatus=0;

    //资产名称，对应oa下拉框
    private Integer asset;
    private Integer location;
//    @Column(name = "assert_num", length = 100)
//    private String assertNum;
//
//    @Column(name = "brand", length = 100)
//    private String brand;
//
//    @Column(name = "model", length = 100)
    private String model;
//
//    @Column(name = "u_amount")
//    private Integer uAmount;
//
//    @Column(name = "cpu_port_amount")
//    private Integer cpuPortAmount;
//
//    @Column(name = "memory_port_amount")
//    private Integer memoryPortAmount;
//
//    @Column(name = "disk_port_amount")
//    private Integer diskPortAmount;
//
//    @Column(name = "pci_port_amount")
//    private Integer pciPortAmount;
//
//    @Column(name = "ele_port_amount")
//    private Integer elePortAmount;
//
//    @Column(name = "memory_total_capacity")
//    private Integer memoryTotalCapacity;
//
//    @Column(name = "machine_cabinet_id")
//    private Long machineCabinetId;
//
//    @Column(name = "machine_cabinet_u_id")
//    private Long machineCabinetUId;

//    @Column(name = "part_standard_code", length = 100, columnDefinition = "varchar(100) DEFAULT NULL COMMENT '硬盘规格业务编码'")
//    private String partStandardCode;
//
//    @Column(name = "part_num", length = 100, columnDefinition = "varchar(100) DEFAULT NULL COMMENT '规格配件号'")
    private String partNum;
////    @Column(name = "part_standard_name", length = 100, columnDefinition = "varchar(100) DEFAULT NULL COMMENT '硬盘规格名称'")
    private String partStandardName;
//
//    @Column(name = "sn", length = 100, columnDefinition = "varchar(100) DEFAULT NULL COMMENT '序列号'")
//    private String sn;
//
//    @Column(name = "location_id", columnDefinition = "varchar(10) DEFAULT NULL COMMENT '位置id  库存状态是机房id\\r\\n装机状态是服务器明细id'")
//    private String locationId;
}
